#ifndef _ICECODE_UTILS_DEBUG_HPP
#define _ICECODE_UTILS_DEBUG_HPP

#include <string>

namespace icecode {
  class Debug
  {
  public:
    /*
      THROWS:
       std::runtime_error("Unable to open log file")
    */
    Debug(std::string fname);
    ~Debug();
    
    void msg(std::string s) throw();
    void warning(std::string s) throw();
    void error(std::string s) throw();
    
  private:
    std::string fname; //Log file name
    int log; //Log file descriptor

    void rawMessage(std::string s, bool err = false) const throw();
  };
}

#endif //_ICECODE_UTILS_DEBUG_HPP
